#ifndef EXCEPTION_H_
#define EXCEPTION_H_

namespace physicsworks {

namespace exception {

/**
 * Parent of all exception classes.
 */
class Exception {
public:
	virtual ~Exception() {}
	virtual std::string msg() const = 0;
};

/**
 * Exception that indicates the body was already added in this world.
 * 
 * Use Body::clone() if you want other body with the same data to be added.
 */
class BodyAlreadyAdded : virtual public Exception {
public:
	virtual ~BodyAlreadyAdded() {}
};

/**
 * Exception that indicates the respective body already exist in another world
 * running in the universe.
 * 
 * Use Body::clone() if you want other body with the same data to be added.
 */
class BodyAnotherWorld : virtual public Exception {
public:
	virtual ~BodyAnotherWorld() {}
};

/**
 * Exception that indicates the world was already added in the universe.
 */
class WorldAlreadyAdded : virtual public Exception {
public:
	virtual ~WorldAlreadyAdded() {}
};

/**
 * Unkown body.
 */
class UnkownBody : virtual public Exception {
public:
	virtual ~UnkownBody() {}
};

/**
 * Unkown world.
 */
class UnkownWorld : virtual public Exception {
public:
	virtual ~UnkownWorld() {}
};

/**
 * Exception that indicates the world has some bodies that are already added
 * in another world running in the universe.
 */
class WorldBodyAlreadyAdded : virtual public Exception {
public:
	virtual ~WorldBodyAlreadyAdded() {}
};

class BadArg : virtual public Exception {
public:
	virtual ~BadArg() {}
};

}

}

#endif /*EXCEPTION_H_*/
